<template>
    <view>

        <daya-clone-navbar :prop_clone_navbar="clone_navbar" :prop_is_ipx="is_ipx"/>

        <view class="container">
            <view class="head" v-if="xtxx.gs_img.length > 0">
                <swiper :autoplay="true" :circular="true" duration="500" :indicatorDots="true" interval="3000">
                    <swiper-item v-for="(item, index) in xtxx.gs_img" :key="index">
                        <image class="slide-image" mode="aspectFill" :src="item"></image>
                    </swiper-item>
                </swiper>
            </view>
            <view class="weui-cells weui-cells_after-title" style="border-bottom: 1rpx solid #efeff4">
                <view class="weui-cell weui-cell_access" hoverClass="weui-cell_active">
                    <view class="weui-cell__hd">
                        <image src="https://yunkeososyunchuc.bc8t.cn/ymq_canyino2o/static/gssjjs.png" style="margin-right: 5px; vertical-align: middle; width: 20px; height: 20px"></image>
                    </view>
                    <view class="weui-cell__bd" style="font-weight: bold">商家介绍</view>
                </view>
            </view>
            <view class="seller_info margin">
                <rich-text :nodes="xtxx.gs_details"></rich-text>
            </view>
            <view class="weui-cells weui-cells_after-title" style="margin-bottom: 30rpx">
                <navigator @tap="maketel" class="weui-cell weui-cell_access" hoverClass="weui-cell_active">
                    <view class="weui-cell__hd">
                        <image src="https://yunkeososyunchuc.bc8t.cn/ymq_canyino2o/static/gstel.png" style="margin-right: 5px; vertical-align: middle; width: 20px; height: 20px"></image>
                    </view>
                    <view class="weui-cell__bd">联系电话：{{ xtxx.gs_tel }}</view>
                    <view class="weui-cell__ft weui-cell__ft_in-access"></view>
                </navigator>
                <navigator class="weui-cell weui-cell_access" hoverClass="weui-cell_active" url="">
                    <view class="weui-cell__hd">
                        <image src="https://yunkeososyunchuc.bc8t.cn/ymq_canyino2o/static/gssj.png" style="margin-right: 5px; vertical-align: middle; width: 20px; height: 20px"></image>
                    </view>
                    <view class="weui-cell__bd">营业时间：{{ xtxx.gs_time }}</view>
                    <view class="weui-cell__ft"></view>
                </navigator>
                <navigator @tap="location" class="weui-cell weui-cell_access" hoverClass="weui-cell_active">
                    <view class="weui-cell__hd">
                        <image src="https://yunkeososyunchuc.bc8t.cn/ymq_canyino2o/static/gsdt.png" style="margin-right: 5px; vertical-align: middle; width: 20px; height: 20px"></image>
                    </view>
                    <view class="weui-cell__bd">地址：{{ xtxx.gs_add }}</view>
                    <view class="weui-cell__ft weui-cell__ft_in-access"></view>
                </navigator>
            </view>
        </view>
    </view>
</template>

<script>
import cardlist from '@/ymq_canyino2o/dist/cardlist/index';
import gettel from '@/ymq_canyino2o/dist/gettel/index';
var app = getApp();
export default {
    components: {
        cardlist,
        gettel
    },
    data() {
        return {
            imgUrls: [
                'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
                'http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg',
                'http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg'
            ],

            xtxx: {
                gs_img: [],
                gs_details: '',
                gs_tel: '',
                gs_time: '',
                gs_add: ''
            },


        };
    },
    onLoad: function (o) {
        this.onLoadClone3389(o);
    },
    onReady: function () {},
    onShow: function () {},
    onHide: function () {},
    onUnload: function () {},
    onPullDownRefresh: function () {
        this.onLoadClone3389({});
        uni.stopPullDownRefresh();
    },
    onReachBottom: function () {},
    onShareAppMessage: function () {},
    methods: {
        onLoadClone3389: function (o) {
            var that = this;
            app.globalData.setNavigationBarColor(this);
            this.appPageOnLoad(app);
            app.globalData.util.request({
                url: 'entry/wxapp/system',
                cachetime: '0',

                success: function (o) {
                    console.log(o);
                    var t = o.data;
                    that.setData({
                        xtxx: t
                    });
                }
            });
        },

        maketel: function (o) {
            var t = this.xtxx.tel;
            uni.makePhoneCall({
                phoneNumber: t
            });
        },

        location: function () {
            var o = this.xtxx.gs_zb.split(',');
            var t = this.xtxx;
            console.log(o);
            uni.openLocation({
                latitude: parseFloat(o[0]),
                longitude: parseFloat(o[1]),
                address: t.gs_add,
                name: '位置'
            });
        }
    }
};
</script>
<style>
@import './Liar.css';
</style>
